package com.itheima.tlias84.mapper;

import com.itheima.tlias84.annotaion.ReportLog;
import com.itheima.tlias84.dto.SelectStudentsDTO;
import com.itheima.tlias84.po.InsertClazzParam;
import com.itheima.tlias84.po.InsertStudetsParam;
import com.itheima.tlias84.po.SelectStudentPageParam;
import com.itheima.tlias84.utils.ResultUtil;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface StudentsMapper {
    @ReportLog
    //增加
    @Insert("insert into students(name,no,gender,phone,id_card,is_college,address,degress,graduation_date,clazzId)" +
            "values (#{in.name},#{in.no},#{in.gender},#{in.phone},#{in.idCard},#{in.isCollege},#{in.address},#{in.degress},#{in.graduationDate},#{in.clazzId})")
    int insertStudents(@Param("in")InsertStudetsParam insertStudetsParam);

    List<SelectStudentsDTO> selelectStudentsPageParam (@Param("se")SelectStudentPageParam selectStudentPageParam);

}
